Debugger Options Examples

Debug Statement Example

A simulation model demonstrates a proposed flexible manufacturing system which produces castings. A variable, WIP, is used to track the work in process for the system. Suppose we want to display the Debugger when the variable, WIP, reaches a value of 300. We could place an IF...THEN statement including DEBUG after the statement incrementing the variable, WIP, as shown below:

 

By checking the box next to the DEBUG statement in the Debugger Options dialog, the Debugger is displayed when the variable, WIP, reaches 300.

Global Change Example

Suppose we want to know when the variable, COUNT, is incremented. We would check the box to the left of Global Change and type COUNT in the Global Change field. This will display the Debugger dialog box each time COUNT changes. It will also display the previous and changed value of COUNT.

User Condition Example

Suppose we want to follow a casting through the entire system (i.e., from when an entity enters the system to when it exits). We would set an attribute equal to a unique number in the arrival logic for a single casting (Att1=3). In other words, only one casting in the system should have Att1=3. We would then check the User Condition box and enter the condition as "Att1=3." We would then select At Each Thread Initiation as the Check Condition. The debugger is displayed each time a particular customer initiates a new thread. For example, the debugger may display the following information:

Debugger syntax

Casting @ loc1: GET Oper_1

WAIT N(5,3)

INC Var1

Casting @ loc2: JOIN 1 Fixture

...

...

...